import React from "react"
class Stop extends React.Component {
    state = {
        num: 30
    }
    componentDidMount() {
        setTimeout(() => {
            this.setState({
                num: 33
            })
        }, 1000)
    }
    render() {
        if (this.state.num == 30) {
            return (
                <fieldset>
                    <legend>阻止组件渲染</legend>
                    <h1>今晚打老虎，凌晨四点开始</h1>
                </fieldset>
            )
        } else {
            return null
        }
    }
}
export default Stop